Instructions

Show first name of patients that start with the letter 'C'
Cogoport

Instructions

Show first name and last name of patients that weight within the range of 100 to 120 (inclusive)
Cogoport

Instructions

Update the patients table for the allergies column. If the patient's allergies is null then replace it with 'NKA'
Cogoport

Instructions

Show first name and last name concatinated into one column to show their full name.
Cogoport

Instructions

Show first name, last name, and the full province name of each patient. Example: 'Ontario' instead of 'ON'
Cogoport

Instructions

Show how many patients have a birth_date with 2010 as the birth year.
Cogoport

Instructions

Show the first_name, last_name, and height of the patient with the greatest height.
Cogoport

Instructions

Show all columns for patients who have one of the following patient_ids: 1,45,534,879,1000
Cogoport

Instructions

Show the total number of admissions
Cogoport

Instructions

Show all the columns from admissions where the patient was admitted and discharged on the same day.
Cogoport

Instructions

Show the patient id and the total number of admissions for patient_id 579.
Cogoport

Instructions

Based on the cities that our patients live in, show unique cities that are in province_id 'NS'?
Cogoport

Instructions

Write a query to find the first_name, last name, and birth date of patients who have height more than 160 and weight more than 70
Cogoport

Instructions

Write a query to find list of patients first_name, last_name, and allergies from city 'Hamilton' where allergies is not null
Cogoport

Instructions

Based on cities where our patient lives in, write a query to display the list of unique city starting with a vowel (a, e, i, o, u). Show the result order in ascending by city.
Cogoport

Instructions

Show unique birth years from patients and order them by ascending.
Cogoport

Instructions

Show unique first names from the patients table which only occurs once in the list. For example, if two or more people are named 'John' in the first_name column then don't include their name in the output list. If only 1 person is named 'Leo' then include them in the output.
Cogoport

Instructions

Show patient_id and first_name from patients where their first_name start and ends with 's' and is at least 6 characters long.
Cogoport

Instructions

Show patient_id, first_name, last_name from patients whos diagnosis is 'Dementia'. Primary diagnosis is stored in the admissions table.
Cogoport

Instructions

Display every patient's first_name. Order the list by the length of each name and then by alphbetically
Cogoport

Instructions

Show the total amount of male patients and the total amount of female patients in the patients table. Display the two results in the same row.
Cogoport

Instructions

Show first and last name, allergies from patients which have allergies to either 'Penicillin' or 'Morphine'. Show results ordered ascending by allergies then by first_name then by last_name.
Cogoport

Instructions

Show patient_id, diagnosis from admissions. Find patients admitted multiple times for the same diagnosis.
Cogoport

Instructions

Show the city and the total number of patients in the city. Order from most to least patients and then by city name ascending.
Cogoport

Instructions

Show first name, last name and role of every person that is either patient or doctor. The roles are either "Patient" or "Doctor"
Cogoport

Instructions

Show all allergies ordered by popularity. Remove 'NKA' and NULL values from query.
Cogoport

Instructions

Show all patient's first_name, last_name, and birth_date who were born in the 1970s decade. Sort the list starting from the earliest birth_date.
Cogoport

Instructions

We want to display each patient's full name in a single column. Their last_name in all upper letters must appear first, then first_name in all lower case letters. Separate the last_name and first_name with a comma. Order the list by the first_name in decending order EX: SMITH,jane
Cogoport

Instructions

Show the province_id(s), sum of height; where the total sum of its patient's height is greater than or equal to 7,000.
Cogoport

Instructions

Show the difference between the largest weight and smallest weight for patients with the last name 'Maroni'
Cogoport

Instructions

Show all of the days of the month (1-31) and how many admission_dates occurred on that day. Sort by the day with most admissions to least admissions.
Cogoport

Instructions

Show the all columns for patient_id 542's most recent admission_date.
Cogoport

Instructions

Show patient_id, attending_doctor_id, and diagnosis for admissions that match one of the two criteria: 1. patient_id is an odd number and attending_doctor_id is either 1, 5, or 19. 2. attending_doctor_id contains a 2 and the length of patient_id is 3 characters.
Cogoport

Instructions

Show first_name, last_name, and the total number of admissions attended for each doctor. Every admission has been attended by a doctor.
Cogoport

Instructions

For each doctor, display their id, full name, and the first and last admission date they attended.
Cogoport

Instructions

Display the total amount of patients for each province. Order by descending.
Cogoport

Instructions

For every admission, display the patient's full name, their admission diagnosis, and their doctor's full name who diagnosed their problem.
Cogoport

Instructions

display the number of duplicate patients based on their first name and last name. Ex: A patient with an identical name can be considered a duplicate.
Cogoport

Instructions

Display patient's full name, height in the unit feet rounded to 1 decimal, weight in the unit pounds rounded to 0 decimals, birth_date, gender non abbreviated. Convert CM to feet by dividing by 30.48. Convert KG to pounds by multiplying by 2.205.
Cogoport

Instructions

Show all of the patients grouped into weight groups. Show the total amount of patients in each weight group. Order the list by the weight group decending. For example, if they weight 100 to 109 they are placed in the 100 weight group, 110-119 = 110 weight group, etc.
Cogoport

Instructions

Show patient_id, weight, height, isObese from the patients table. Display isObese as a boolean 0 or 1. Obese is defined as weight(kg)/(height(m)2) >= 30. weight is in units kg. height is in units cm.
Cogoport

Instructions

Show patient_id, first_name, last_name, and attending doctor's specialty. Show only the patients who has a diagnosis as 'Dementia' and the doctor's first name is 'Lisa' Check patients, admissions, and doctors tables for required information.
Cogoport

Instructions

All patients who have gone through admissions, can see their medical documents on our site. Those patients are given a temporary password after their first admission. Show the patient_id and temp_password. The password must be the following, in order: 1. patient_id 2. the numerical length of patient's last_name 3. year of patient's birth_date
Cogoport

Instructions

Each admission costs $50 for patients without insurance, and $10 for patients with insurance. All patients with an even patient_id have insurance. Give each patient a 'Yes' if they have insurance, and a 'No' if they don't have insurance. Add up the admission_total cost for each has_insurance group.
Cogoport

Instructions

Show the provinces that has more patients identified as 'M' than 'F'. Must only show full province_name
Cogoport

Instructions

We are looking for a specific patient. Pull all columns for the patient who matches the following criteria: - First_name contains an 'r' after the first two letters. - Identifies their gender as 'F' - Born in February, May, or December - Their weight would be between 60kg and 80kg - Their patient_id is an odd number - They are from the city 'Kingston'
Cogoport

Instructions

Show the percent of patients that have 'M' as their gender. Round the answer to the nearest hundreth number and in percent form.
Cogoport

Instructions

For each day display the total amount of admissions on that day. Display the amount changed from the previous date.
Cogoport

Instructions

Sort the province names in ascending order in such a way that the province 'Ontario' is always on top.